const webpack = require('webpack')
const merge = require('webpack-merge')
module.exports = {
  configureWebpack: {
    plugins: [
      new webpack.ProvidePlugin({
        $: 'jquery',
        jQuery: 'jquery',
        'windows.jQuery': 'jquery'
      })
    ]
  },
  publicPath: './',
  chainWebpack: config => {
    config.module
      .rule('images')
      .test(/\.(png|jpe?g|gif|webp|ico)(\?.*)?$/)
      .use('url-loader')
      .loader('url-loader')
      .tap(options =>
        merge(options, {
          limit: 1000000000
        })
      )
      .end()
    config.module
      .rule('fonts')
      .test(/\.(eot|svg|ttf|woff|woff2?)$/)
      .use('url-loader')
      .loader('url-loader')
      .tap(options =>
        merge(options, {
          limit: 10000000000
        })
      )
      .end()
  },
  productionSourceMap: false
}
